Skip to content

Test/comprehensive unit tests 13#397

Merged
JusterZhu merged 7 commits into
masterfrom
test/comprehensive-unit-tests-13
May 25, 2026
Merged

Test/comprehensive unit tests 13#397
JusterZhu merged 7 commits into
masterfrom
test/comprehensive-unit-tests-13

Conversation

@JusterZhu

Copy link
Copy Markdown
Collaborator

No description provided.

JusterZhu added 7 commits May 24, 2026 22:46
Add comprehensive unit tests covering:
- Client/Upgrade mutual upgrade integration (ProcessInfo IPC, version chain, forcibly update)
- Differential upgrade full cycle (Clean/Dirty, binary files, nested directories, mixed operations)
- Event notification pipeline (all 7 event types, push upgrade simulation, multiple listeners)
- Parameter matrix combinations (UpdateOptions, Configinfo validation, auth schemes, blacklists)
- Real-world developer usage scenarios (minimal setup, full production chain, fluent API)
- StorageManager backup/restore tests
- PipelineContext and DiffPipeline tests

Results: CoreTest 111/112 pass, DifferentialTest 23/23 pass, ClientCoreTest 115/115 pass
- Rebase on origin/master (merged project structure)
- Fix all namespace references to GeneralUpdate.Core.*
- Fix API changes: AppType enum, UpdateOptions, BlackListManager
- Fix copilot suggestions: encoding, tautology, mutations, unused vars
- Fix AddCustomOption empty list and Precheck callback tests

Results: CoreTest 165p, DifferentialTest 85p, ClientCoreTest 42p
… model tests

- BootstrapHooksAndExtensionsTests: Hook lifecycle (5 methods), RejectingHooks,
  UpdateContext/DownloadContext models, UpdateReport/UpdateEvent, IUpdateEventListener (8 methods), Security schemes
- BootstrapFullParameterMatrixTests: ALL 42 UpdateOptions constants with type coverage,
  6 combination chains (all 33 options, silent client, parallel diff, upgrade no backup, full security)
- ConfigurationModelsTests: BlackListConfig, HubConfig, DownloadAsset, DownloadPlan,
  DownloadProgress, DownloadResult, all 9 enum types, UpdateOption<T> value semantics

Results: CoreTest 283p/3f(pre-existing), all new tests pass
- Chain_ClientAndUpgrade_BothFullyConfigured: production deployment with
  Client and Upgrade bootstraps configured simultaneously with ALL
  non-conflicting parameters (30+ options each), hooks, listeners,
  extensions. Verifies independent instances.

- Chain_ClientAndUpgrade_CompleteDeveloperWorkflow: real-world developer
  flow showing complete API surface for both roles in a single method
Copilot AI review requested due to automatic review settings May 25, 2026 03:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR primarily updates test-suite wording/formatting and adjusts backup cleanup behavior in StorageManager to sort backup directories by version name rather than filesystem creation time.

Changes:

  • Replaced garbled “??” separators in integration test comments/regions with an em dash for readability.
  • Added System.Linq import to support LINQ usage in ParameterMatrixAndEventTests.
  • Changed StorageManager.CleanBackup to order backup directories by Version parsed from directory name (descending) before deleting older entries.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/DifferentialTest/DifferentialUpgradeIntegrationTests.cs Comment/region header text cleanup (separator character replacement).
tests/CoreTest/Bootstrap/ParameterMatrixAndEventTests.cs Adds System.Linq for existing LINQ usage in the test file.
src/c#/GeneralUpdate.Core/FileSystem/StorageManager.cs Changes backup cleanup ordering from CreationTime to parsed Version ordering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +308 to +312
.OrderByDescending(d =>
{
var name = d.Name;
return Version.TryParse(name, out var v) ? v : new Version(0, 0);
})
@JusterZhu JusterZhu merged commit 341d00d into master May 25, 2026
4 checks passed
@JusterZhu JusterZhu deleted the test/comprehensive-unit-tests-13 branch May 25, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants